<? if(!empty($products)) { ?>

    <div class="content_block" style="width:100%">

        <h3>Supplier Products:</h3>
        <div class="hr"></div>
        <div class="live_search_msg"></div>    

        <? foreach($products as $prod){?>  
            <div class="product_block search <?=($prod['Approved_Products']!=1)?'unapproved':(($prod['Active_Products']=='1')?'active':'inactive')?>">
                <a href="<?=site_url('admin/products/preview/'.$prod['id_Products'])?>" rel="preview">
                <img src="<?=Thumbnail(base_url().UPLOADS_FOLDER.PRODUCT_IMG_FOLDER.$prod['Main_Image'])?>" />
                <span class="title"><?=trim_string($prod['Name_Products'],PRODUCT_TITLE_LENGTH,"...")?></span>
                </a>
   
                ---
                <br />

                <h4 style="display:inline">Code:</h4> <?=$prod['Code_Products']?><br />
                <h4 style="display:inline">Price:</h4> <?=$prod['Price_Products']?> <?=$prod['Currency_Products']?><br />


            <? if($prod['Approved_Products']==1) { ?>
                <? if ($prod['Active_Products'] == 1){?>
                <a href="<?=site_url('admin/products/deactivate/'.$prod['id_Products'])?>" class="button">hide</a>
                <? } else { ?> 
                <a href="<?=site_url('admin/products/activate/'.$prod['id_Products'])?>" class="button">show</a>
                <? } ?>
            <? } ?>

            </div>
        <? } ?>                      

    </div>

    <div class="content_block">
        <form action="" method="post">
            <input type="hidden" name="edit_supplier_products" value="true" />
            <input type="submit" class="button" id="edit_supplier_trigger" href="#" value="EDIT SUPPLIER PRODUCTS" />
        </form>
    </div>

<? } ?>